package com.breaktian.controller;

import com.breaktian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    public UserController(){
        super();
    }


    @RequestMapping(value="/index",method = RequestMethod.GET)
    @ResponseBody
    public String index() {
        return "test";
    }

//    @RequestMapping(value="/getAllUsers",method = RequestMethod.GET)
//    @ResponseBody
//    public List<UserModel> getAllUsers() {
//        List<UserModel> userModels = userService.getUserById(1);
//        return userModels;
//    }
//
//    @RequestMapping(value="/getUser",method = RequestMethod.GET)
//    @ResponseBody
//    public UserModel getUser(String id) {
//        UserModel userModel = userService.getUser(id);
//        return userModel;
//    }

}
